
TOPDIR	= .

include	$(TOPDIR)/Rules.make

.PHONY : all clean

all : $(BIN)/core.o

$(BIN)/core.o : core.o $(TMP)/cpu.o $(TMP)/mem.o $(TMP)/dev.o
	$(LD) $(LDFLAGS) -o $@ $<

$(TMP)/cpu.o :
	(cd cpu; make)

$(TMP)/mem.o :
	(cd mem; make)

$(TMP)/dev.o :
	(cd dev; make)

clean :
	rm -f $(BIN)/*.o
	rm -f $(TMP)/*.o
	(cd cpu; make clean)
	(cd mem; make clean)
	(cd dev; make clean)
